from django.test import TestCase

# Create your tests here.
# -*- coding: utf-8-*-
import re
html='<p style="box-sizing: border-box; margin-top: 0px; margin-bottom: 0.2rem; line-height: 1.8; color: rgb(68, 68, 68); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Ubuntu, &quot;Helvetica Neue&quot;, Helvetica, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, &quot;Source Han Sans CN&quot;, sans-serif; white-space: normal; background-color: rgb(255, 255, 255);"><a class="fluidbox fluidbox__instance-1 fluidbox--initialized fluidbox--closed fluidbox--ready" href="http://static.opp2.com/wp-content/uploads/2019/02/xinmeitiyunying-1.jpg" data-fluidbox="" data-fluidbox-loader="true" style="box-sizing: border-box; background-color: transparent; color: rgb(26, 188, 156); text-decoration-line: none; transition: all 0.3s ease-out 0s; outline: none;">哈哈哈哈</a></p>'
dr = re.compile(r'<[^>]+>',re.S)
dd = dr.sub('', html)
print(dd)

